// // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
// //
// // Licensed under the Apache License, Version 2.0 (the "License");
// // you may not use this file except in compliance with the License.
// // You may obtain a copy of the License at

// //     http://www.apache.org/licenses/LICENSE-2.0
// //
// // Unless required by applicable law or agreed to in writing, software
// // distributed under the License is distributed on an "AS IS" BASIS,
// // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// // See the License for the specific language governing permissions and
// // limitations under the License.

// #ifndef __SPP_TASK_H__
// #define __SPP_TASK_H__

// #include <stdint.h>
// #include <stdbool.h>
// #include <stdio.h>

// #define SPP_TASK_TAG                   "SPP_TASK"

// #define SPP_TASK_SIG_WORK_DISPATCH          (0x01)
// #define SPP_PACK_MAX_SIZE 496
// typedef enum {
//     M_REPORT_VERSIONS = 0x1,
//     S_REPORT_VERSIONS,
//     M_CAMERA_GET_AWB = 0x3,
//     S_CAMERA_GET_AWB_ACK,
//     M_CAMERA_SET_AWB = 0x5,
//     S_CAMERA_SET_AWB_ACK,
//     M_CAMERA_SET_ACE = 0x7,
//     S_CAMERA_SET_ACE_ACK,
//     M_CAMERA_SET_IMG_SIZE = 0x9,
//     S_CAMERA_SET_IMG_SIZE_ACK,
//     M_CAMERA_SET_QUALITY = 0xb,
//     S_CAMERA_SET_QUALITY_ACK,
//     M_CAMERA_GET_IMG = 0xd,
//     S_CAMERA_IMG_ACK,
//     M_UPDATE_MOUDLE = 0xf,
//     S_UPDATRE_ACK,
//     M_SET_BT_NAME = 0x11,
//     S_SET_BT_NAME_ACK,
//     M_REPORT_BT_NAME = 0x13,
//     S_REPORT_BT_NAME_ACK,
//     M_REPORT_BT_MAC = 0x15,
//     S_REPORT_BT_MAC_ACK,
//     M_SET_CAMERA_LIGHT = 0x17,
//     S_SET_CAMERA_LIGHT_ACK,
//     M_REPORT_CAMERA_LIGHT = 0x19,
//     S_REPORT_CAMERA_LIGHT_ACK,
//     M_REPORT_CAMERA_STATU = 0x1b,
//     S_REPORT_CAMERA_STATU_ACK,

//     S_CAMERA_INIT_FAIL = 0xfd,
//     S_RECV_FAIL = 0xff,
// }BT_CMD_E;

// // Err 型
// typedef enum ERR_E {
//     E_TRUE = 0,
//     E_FALSE,
//     E_DOING,
//     E_INIT_FAIL,
//     E_SEND_LEN,
//     E_SEND_NONE,
//     E_SEND_FAIL,
//     E_RECV_NONE,
//     E_BUF_OVERFLOW,
//     E_BUF_FULL,
//     E_PARM_ERR,
//     E_MALLOC_FAIL,
//     E_FIND_NONE,
// } ERR_E;

// #define OPCODE_START 0
// #define OPCODE_DATA  1
// #define OPCODE_END   2
// #define OPCODE_FAIL  0xff
// /**
//  * @brief     handler for the dispatched work
//  */
// typedef void (* spp_task_cb_t) (uint16_t event, void *param);

// /* message to be sent */
// typedef struct {
//     uint16_t             sig;      /*!< signal to spp_task_task */
//     uint16_t             event;    /*!< message event id */
//     spp_task_cb_t        cb;       /*!< context switch callback */
//     void                 *param;   /*!< parameter area needs to be last */
// } spp_task_msg_t;

// /**
//  * @brief     parameter deep-copy function to be customized
//  */
// typedef void (* spp_task_copy_cb_t) (spp_task_msg_t *msg, void *p_dest, void *p_src);

// /**
//  * @brief     work dispatcher for the application task
//  */
// bool spp_task_work_dispatch(spp_task_cb_t p_cback, uint16_t event, void *p_params, int param_len, spp_task_copy_cb_t p_copy_cback);

// void spp_task_task_start_up(void);

// void spp_task_task_shut_down(void);


// /**
//  * @brief     handler for write and read
//  */
// typedef void (* spp_wr_task_cb_t) (void *fd);

// void spp_wr_task_start_up(spp_wr_task_cb_t p_cback, int fd);

// void spp_wr_task_shut_down(void);

// bool init_bt_spp(void);
// bool ssp_write_data(uint8_t *pBuff, uint16_t Len);
// uint16_t data_check(uint8_t opcode, uint8_t result, uint8_t *data,uint16_t len);
// void ssp_command_process(uint8_t * parse_buff, uint8_t send_port);
// ERR_E spp_get_cmd(uint8_t u8Data, uint8_t * parse_buff, uint16_t * buf_index);

// #endif ///__SPP_TASK_H__
